﻿namespace HRM.CORE.REPORT
{
    using DevExpress.Utils;
    using DevExpress.XtraPrinting;
    using DevExpress.XtraReports.UI;
    using Dictionary.ERP;
    using HRM.CORE;
    using HRM.CORE.CLASS;
    using System; using Extra.ERP;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Printing;

    public class rptTimekeeperTotal : XtraReport
    {
        private XRLabel bandOvertime;
        private BottomMarginBand BottomMargin;
        private XRTableCell colAbsentL;
        private XRTableCell colAbsentWOL;
        private XRTableCell colCompensationDay;
        private XRTableCell colEarlyMinute;
        private XRTableCell colEmployeeName;
        private XRTableCell colExtraHour;
        private XRTableCell colFurloughDay;
        private XRTableCell colLateMinute;
        private XRTableCell colNightDutyDay;
        private XRTableCell colNightHour;
        private XRTableCell colOrder;
        private XRTableCell colOvertime150;
        private XRTableCell colOvertime200;
        private XRTableCell colOvertime300;
        private XRTableCell colOvertimeTotal1;
        private XRTableCell colPosition;
        private XRTableCell colPrivateHour;
        private XRTableCell colRealDay;
        private XRTableCell colRegulationDay;
        private XRTableCell colTotalHour;
        private XRTableCell colWorkTotal;
        private IContainer components;
        private DetailBand Detail;
        private GroupHeaderBand GroupHeader1;
        private HRM_TIMEKEEPER_TOTAL l_TimekeeperTotal;
        private string m_Code;
        private int m_Level;
        private int m_Month;
        private int m_Order;
        private int m_Year;
        private ReportFooterBand ReportFooter;
        private ReportHeaderBand ReportHeader;
        private TopMarginBand TopMargin;
        private XRTableCell txtAbsentL;
        private XRTableCell txtAbsentWOL;
        private XRTableCell txtCompensationDay;
        private XRTableCell txtEarlyMinute;
        private XRTableCell txtEmployeeName;
        private XRTableCell txtExtraHour;
        private XRTableCell txtFurloughDay;
        private XRTableCell txtLateMinute;
        private XRTableCell txtNightDutyDay;
        private XRTableCell txtNightHour;
        private XRTableCell txtOrder;
        private XRTableCell txtOvertime150;
        private XRTableCell txtOvertime200;
        private XRTableCell txtOvertime300;
        private XRTableCell txtOvertimeTotal1;
        private XRTableCell txtPosition;
        private XRTableCell txtPrivateHour;
        private XRTableCell txtRealDay;
        private XRTableCell txtRegulationDay;
        private XRLabel txtTitle;
        private XRTableCell txtTotalHour;
        private XRLabel txtUnit;
        private XRTableCell txtWorkTotal;
        private XRLabel xrLabel1;
        private XRLabel xrLabel2;
        private XRLabel xrLabel4;
        private XRTable xrTable1;
        private XRTable xrTable2;
        private XRTableRow xrTableRow1;
        private XRTableRow xrTableRow2;

        public rptTimekeeperTotal()
        {
            this.l_TimekeeperTotal = new HRM_TIMEKEEPER_TOTAL();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_Order = 0;
            this.components = null;
            this.InitializeComponent();
        }

        public rptTimekeeperTotal(int Level, string Code, int Month, int Year)
        {
            this.l_TimekeeperTotal = new HRM_TIMEKEEPER_TOTAL();
            this.m_Level = 0;
            this.m_Code = "";
            this.m_Month = 0;
            this.m_Year = 0;
            this.m_Order = 0;
            this.components = null;
            this.InitializeComponent();
            this.m_Level = Level;
            this.m_Code = Code;
            this.m_Month = Month;
            this.m_Year = Year;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.Detail = new DetailBand();
            this.xrTable2 = new XRTable();
            this.xrTableRow2 = new XRTableRow();
            this.txtOrder = new XRTableCell();
            this.txtEmployeeName = new XRTableCell();
            this.txtWorkTotal = new XRTableCell();
            this.txtRealDay = new XRTableCell();
            this.txtNightDutyDay = new XRTableCell();
            this.txtRegulationDay = new XRTableCell();
            this.txtFurloughDay = new XRTableCell();
            this.txtCompensationDay = new XRTableCell();
            this.txtAbsentL = new XRTableCell();
            this.txtAbsentWOL = new XRTableCell();
            this.txtTotalHour = new XRTableCell();
            this.txtLateMinute = new XRTableCell();
            this.txtEarlyMinute = new XRTableCell();
            this.txtOvertime150 = new XRTableCell();
            this.txtOvertime200 = new XRTableCell();
            this.txtOvertime300 = new XRTableCell();
            this.txtNightHour = new XRTableCell();
            this.txtExtraHour = new XRTableCell();
            this.txtPrivateHour = new XRTableCell();
            this.txtOvertimeTotal1 = new XRTableCell();
            this.txtPosition = new XRTableCell();
            this.TopMargin = new TopMarginBand();
            this.BottomMargin = new BottomMarginBand();
            this.ReportHeader = new ReportHeaderBand();
            this.txtTitle = new XRLabel();
            this.txtUnit = new XRLabel();
            this.GroupHeader1 = new GroupHeaderBand();
            this.bandOvertime = new XRLabel();
            this.xrLabel4 = new XRLabel();
            this.xrLabel2 = new XRLabel();
            this.xrLabel1 = new XRLabel();
            this.xrTable1 = new XRTable();
            this.xrTableRow1 = new XRTableRow();
            this.colOrder = new XRTableCell();
            this.colEmployeeName = new XRTableCell();
            this.colWorkTotal = new XRTableCell();
            this.colRealDay = new XRTableCell();
            this.colNightDutyDay = new XRTableCell();
            this.colRegulationDay = new XRTableCell();
            this.colFurloughDay = new XRTableCell();
            this.colCompensationDay = new XRTableCell();
            this.colAbsentL = new XRTableCell();
            this.colAbsentWOL = new XRTableCell();
            this.colTotalHour = new XRTableCell();
            this.colLateMinute = new XRTableCell();
            this.colEarlyMinute = new XRTableCell();
            this.colOvertime150 = new XRTableCell();
            this.colOvertime200 = new XRTableCell();
            this.colOvertime300 = new XRTableCell();
            this.colNightHour = new XRTableCell();
            this.colExtraHour = new XRTableCell();
            this.colPrivateHour = new XRTableCell();
            this.colOvertimeTotal1 = new XRTableCell();
            this.colPosition = new XRTableCell();
            this.ReportFooter = new ReportFooterBand();
            this.xrTable2.BeginInit();
            this.xrTable1.BeginInit();
            this.BeginInit();
            this.Detail.Controls.AddRange(new XRControl[] { this.xrTable2 });
            this.Detail.HeightF = 29.16667f;
            this.Detail.Name = "Detail";
            this.Detail.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.Detail.TextAlignment = TextAlignment.TopLeft;
            this.xrTable2.Borders = BorderSide.Bottom | BorderSide.Right | BorderSide.Left;
            this.xrTable2.LocationFloat = new PointFloat(0f, 0f);
            this.xrTable2.Name = "xrTable2";
            this.xrTable2.Rows.AddRange(new XRTableRow[] { this.xrTableRow2 });
            this.xrTable2.SizeF = new SizeF(1091f, 29.16667f);
            this.xrTable2.StylePriority.UseBorders = false;
            this.xrTableRow2.Cells.AddRange(new XRTableCell[] { 
                this.txtOrder, this.txtEmployeeName, this.txtWorkTotal, this.txtRealDay, this.txtNightDutyDay, this.txtRegulationDay, this.txtFurloughDay, this.txtCompensationDay, this.txtAbsentL, this.txtAbsentWOL, this.txtTotalHour, this.txtLateMinute, this.txtEarlyMinute, this.txtOvertime150, this.txtOvertime200, this.txtOvertime300, 
                this.txtNightHour, this.txtExtraHour, this.txtPrivateHour, this.txtOvertimeTotal1, this.txtPosition
             });
            this.xrTableRow2.Name = "xrTableRow2";
            this.xrTableRow2.Weight = 1.0;
            this.txtOrder.Name = "txtOrder";
            this.txtOrder.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtOrder.StylePriority.UsePadding = false;
            this.txtOrder.StylePriority.UseTextAlignment = false;
            this.txtOrder.Text = "txtOrder";
            this.txtOrder.TextAlignment = TextAlignment.MiddleLeft;
            this.txtOrder.Weight = 0.18749981602642024;
            this.txtOrder.BeforePrint += new PrintEventHandler(this.txtOrder_BeforePrint);
            this.txtEmployeeName.Name = "txtEmployeeName";
            this.txtEmployeeName.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtEmployeeName.StylePriority.UsePadding = false;
            this.txtEmployeeName.StylePriority.UseTextAlignment = false;
            this.txtEmployeeName.Text = "[FirstName] [LastName]";
            this.txtEmployeeName.TextAlignment = TextAlignment.MiddleLeft;
            this.txtEmployeeName.Weight = 0.772351978229241;
            this.txtWorkTotal.BackColor = Color.WhiteSmoke;
            this.txtWorkTotal.Name = "txtWorkTotal";
            this.txtWorkTotal.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtWorkTotal.StylePriority.UseBackColor = false;
            this.txtWorkTotal.StylePriority.UsePadding = false;
            this.txtWorkTotal.StylePriority.UseTextAlignment = false;
            this.txtWorkTotal.Text = "[WorkTotal]";
            this.txtWorkTotal.TextAlignment = TextAlignment.MiddleCenter;
            this.txtWorkTotal.Weight = 0.31877283036864212;
            this.txtRealDay.Name = "txtRealDay";
            this.txtRealDay.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtRealDay.StylePriority.UsePadding = false;
            this.txtRealDay.StylePriority.UseTextAlignment = false;
            this.txtRealDay.Text = "[RealDay]";
            this.txtRealDay.TextAlignment = TextAlignment.MiddleCenter;
            this.txtRealDay.Weight = 0.26564426998301038;
            this.txtNightDutyDay.Name = "txtNightDutyDay";
            this.txtNightDutyDay.StylePriority.UseTextAlignment = false;
            this.txtNightDutyDay.Text = "[NightDutyDay]";
            this.txtNightDutyDay.TextAlignment = TextAlignment.MiddleCenter;
            this.txtNightDutyDay.Weight = 0.266533487942753;
            this.txtRegulationDay.Name = "txtRegulationDay";
            this.txtRegulationDay.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtRegulationDay.StylePriority.UsePadding = false;
            this.txtRegulationDay.StylePriority.UseTextAlignment = false;
            this.txtRegulationDay.Text = "[RegulationDay]";
            this.txtRegulationDay.TextAlignment = TextAlignment.MiddleCenter;
            this.txtRegulationDay.Weight = 0.26564402932510089;
            this.txtFurloughDay.Name = "txtFurloughDay";
            this.txtFurloughDay.StylePriority.UseTextAlignment = false;
            this.txtFurloughDay.Text = "[FurloughDay]";
            this.txtFurloughDay.TextAlignment = TextAlignment.MiddleCenter;
            this.txtFurloughDay.Weight = 0.26564417445571825;
            this.txtCompensationDay.Name = "txtCompensationDay";
            this.txtCompensationDay.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtCompensationDay.StylePriority.UsePadding = false;
            this.txtCompensationDay.StylePriority.UseTextAlignment = false;
            this.txtCompensationDay.Text = "[CompensationDay]";
            this.txtCompensationDay.TextAlignment = TextAlignment.MiddleCenter;
            this.txtCompensationDay.Weight = 0.26564369840583391;
            this.txtAbsentL.Name = "txtAbsentL";
            this.txtAbsentL.StylePriority.UseTextAlignment = false;
            this.txtAbsentL.Text = "[AbsentL]";
            this.txtAbsentL.TextAlignment = TextAlignment.MiddleCenter;
            this.txtAbsentL.Weight = 0.26564435388664032;
            this.txtAbsentWOL.Name = "txtAbsentWOL";
            this.txtAbsentWOL.StylePriority.UseTextAlignment = false;
            this.txtAbsentWOL.Text = "[AbsentWOL]";
            this.txtAbsentWOL.TextAlignment = TextAlignment.MiddleCenter;
            this.txtAbsentWOL.Weight = 0.26564386747790786;
            this.txtTotalHour.Name = "txtTotalHour";
            this.txtTotalHour.StylePriority.UseTextAlignment = false;
            this.txtTotalHour.Text = "[TotalHour]";
            this.txtTotalHour.TextAlignment = TextAlignment.MiddleCenter;
            this.txtTotalHour.Weight = 0.265643985131329;
            this.txtLateMinute.Name = "txtLateMinute";
            this.txtLateMinute.StylePriority.UseTextAlignment = false;
            this.txtLateMinute.Text = "[LateMinute]";
            this.txtLateMinute.TextAlignment = TextAlignment.MiddleCenter;
            this.txtLateMinute.Weight = 0.265643985131329;
            this.txtEarlyMinute.Name = "txtEarlyMinute";
            this.txtEarlyMinute.StylePriority.UseTextAlignment = false;
            this.txtEarlyMinute.Text = "[EarlyMinute]";
            this.txtEarlyMinute.TextAlignment = TextAlignment.MiddleCenter;
            this.txtEarlyMinute.Weight = 0.26564399921360865;
            this.txtOvertime150.Name = "txtOvertime150";
            this.txtOvertime150.StylePriority.UseTextAlignment = false;
            this.txtOvertime150.Text = "[Overtime150]";
            this.txtOvertime150.TextAlignment = TextAlignment.MiddleCenter;
            this.txtOvertime150.Weight = 0.2443924711307966;
            this.txtOvertime200.Name = "txtOvertime200";
            this.txtOvertime200.StylePriority.UseTextAlignment = false;
            this.txtOvertime200.Text = "[Overtime200]";
            this.txtOvertime200.TextAlignment = TextAlignment.MiddleCenter;
            this.txtOvertime200.Weight = 0.24439214676039184;
            this.txtOvertime300.Name = "txtOvertime300";
            this.txtOvertime300.StylePriority.UseTextAlignment = false;
            this.txtOvertime300.Text = "[Overtime300]";
            this.txtOvertime300.TextAlignment = TextAlignment.MiddleCenter;
            this.txtOvertime300.Weight = 0.2443931139423583;
            this.txtNightHour.Name = "txtNightHour";
            this.txtNightHour.StylePriority.UseTextAlignment = false;
            this.txtNightHour.Text = "[NightHour]";
            this.txtNightHour.TextAlignment = TextAlignment.MiddleCenter;
            this.txtNightHour.Weight = 0.2443921473821335;
            this.txtExtraHour.Name = "txtExtraHour";
            this.txtExtraHour.StylePriority.UseTextAlignment = false;
            this.txtExtraHour.Text = "[ExtraHour]";
            this.txtExtraHour.TextAlignment = TextAlignment.MiddleCenter;
            this.txtExtraHour.Weight = 0.24439279340677106;
            this.txtPrivateHour.Name = "txtPrivateHour";
            this.txtPrivateHour.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtPrivateHour.StylePriority.UsePadding = false;
            this.txtPrivateHour.StylePriority.UseTextAlignment = false;
            this.txtPrivateHour.Text = "[PrivateHour]";
            this.txtPrivateHour.TextAlignment = TextAlignment.MiddleCenter;
            this.txtPrivateHour.Weight = 0.21782774573025893;
            this.txtOvertimeTotal1.Name = "txtOvertimeTotal1";
            this.txtOvertimeTotal1.StylePriority.UseTextAlignment = false;
            this.txtOvertimeTotal1.Text = "[OvertimeTotal1]";
            this.txtOvertimeTotal1.TextAlignment = TextAlignment.MiddleCenter;
            this.txtOvertimeTotal1.Weight = 0.20941482797002636;
            this.txtPosition.Name = "txtPosition";
            this.txtPosition.Padding = new PaddingInfo(4, 0, 0, 0, 100f);
            this.txtPosition.StylePriority.UsePadding = false;
            this.txtPosition.StylePriority.UseTextAlignment = false;
            this.txtPosition.Text = "[Description]";
            this.txtPosition.TextAlignment = TextAlignment.MiddleLeft;
            this.txtPosition.Weight = 0.21119216861736612;
            this.TopMargin.HeightF = 48f;
            this.TopMargin.Name = "TopMargin";
            this.TopMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.TopMargin.TextAlignment = TextAlignment.TopLeft;
            this.BottomMargin.HeightF = 56f;
            this.BottomMargin.Name = "BottomMargin";
            this.BottomMargin.Padding = new PaddingInfo(0, 0, 0, 0, 100f);
            this.BottomMargin.TextAlignment = TextAlignment.TopLeft;
            this.ReportHeader.Controls.AddRange(new XRControl[] { this.txtTitle, this.txtUnit });
            this.ReportHeader.HeightF = 56f;
            this.ReportHeader.Name = "ReportHeader";
            this.txtTitle.Font = new Font("Times New Roman", 16f, FontStyle.Bold);
            this.txtTitle.LocationFloat = new PointFloat(4.768372E-05f, 0f);
            this.txtTitle.Name = "txtTitle";
            this.txtTitle.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtTitle.SizeF = new SizeF(1091f, 30.25001f);
            this.txtTitle.StylePriority.UseFont = false;
            this.txtTitle.StylePriority.UseTextAlignment = false;
            this.txtTitle.Text = "BẢNG TỔNG HỢP NG\x00c0Y C\x00d4NG TH\x00c1NG 00/0000";
            this.txtTitle.TextAlignment = TextAlignment.MiddleCenter;
            this.txtUnit.Font = new Font("Times New Roman", 12f);
            this.txtUnit.LocationFloat = new PointFloat(4.768372E-05f, 30.25001f);
            this.txtUnit.Name = "txtUnit";
            this.txtUnit.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.txtUnit.SizeF = new SizeF(1091f, 17.70833f);
            this.txtUnit.StylePriority.UseFont = false;
            this.txtUnit.StylePriority.UseTextAlignment = false;
            this.txtUnit.TextAlignment = TextAlignment.MiddleCenter;
            this.GroupHeader1.Controls.AddRange(new XRControl[] { this.bandOvertime, this.xrLabel4, this.xrLabel2, this.xrLabel1, this.xrTable1 });
            this.GroupHeader1.HeightF = 93.375f;
            this.GroupHeader1.Name = "GroupHeader1";
            this.GroupHeader1.RepeatEveryPage = true;
            this.bandOvertime.BackColor = Color.WhiteSmoke;
            this.bandOvertime.Borders = BorderSide.All;
            this.bandOvertime.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.bandOvertime.LocationFloat = new PointFloat(739.8326f, 0f);
            this.bandOvertime.Name = "bandOvertime";
            this.bandOvertime.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.bandOvertime.SizeF = new SizeF(311.4166f, 38.625f);
            this.bandOvertime.StylePriority.UseBackColor = false;
            this.bandOvertime.StylePriority.UseBorders = false;
            this.bandOvertime.StylePriority.UseFont = false;
            this.bandOvertime.StylePriority.UseTextAlignment = false;
            this.bandOvertime.Text = "Giờ c\x00f4ng l\x00e0m th\x00eam, việc ri\x00eang (đ\x00e3 nh\x00e2n hệ số)";
            this.bandOvertime.TextAlignment = TextAlignment.MiddleCenter;
            this.xrLabel4.BackColor = Color.WhiteSmoke;
            this.xrLabel4.Borders = BorderSide.All;
            this.xrLabel4.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrLabel4.LocationFloat = new PointFloat(589.8326f, 0f);
            this.xrLabel4.Name = "xrLabel4";
            this.xrLabel4.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel4.SizeF = new SizeF(151f, 38.625f);
            this.xrLabel4.StylePriority.UseBackColor = false;
            this.xrLabel4.StylePriority.UseBorders = false;
            this.xrLabel4.StylePriority.UseFont = false;
            this.xrLabel4.StylePriority.UseTextAlignment = false;
            this.xrLabel4.Text = "Đi trễ, về sớm";
            this.xrLabel4.TextAlignment = TextAlignment.MiddleCenter;
            this.xrLabel2.BackColor = Color.WhiteSmoke;
            this.xrLabel2.Borders = BorderSide.All;
            this.xrLabel2.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrLabel2.LocationFloat = new PointFloat(489.8325f, 0f);
            this.xrLabel2.Name = "xrLabel2";
            this.xrLabel2.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel2.SizeF = new SizeF(101.0001f, 38.625f);
            this.xrLabel2.StylePriority.UseBackColor = false;
            this.xrLabel2.StylePriority.UseBorders = false;
            this.xrLabel2.StylePriority.UseFont = false;
            this.xrLabel2.StylePriority.UseTextAlignment = false;
            this.xrLabel2.Text = "Ng\x00e0y kh\x00f4ng t\x00ednh c\x00f4ng";
            this.xrLabel2.TextAlignment = TextAlignment.MiddleCenter;
            this.xrLabel1.BackColor = Color.WhiteSmoke;
            this.xrLabel1.Borders = BorderSide.All;
            this.xrLabel1.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.xrLabel1.LocationFloat = new PointFloat(179.6651f, 0f);
            this.xrLabel1.Name = "xrLabel1";
            this.xrLabel1.Padding = new PaddingInfo(2, 2, 0, 0, 100f);
            this.xrLabel1.SizeF = new SizeF(311.1674f, 38.625f);
            this.xrLabel1.StylePriority.UseBackColor = false;
            this.xrLabel1.StylePriority.UseBorders = false;
            this.xrLabel1.StylePriority.UseFont = false;
            this.xrLabel1.StylePriority.UseTextAlignment = false;
            this.xrLabel1.Text = "Ng\x00e0y t\x00ednh c\x00f4ng";
            this.xrLabel1.TextAlignment = TextAlignment.MiddleCenter;
            this.xrTable1.AnchorVertical = VerticalAnchorStyles.Bottom;
            this.xrTable1.BackColor = Color.WhiteSmoke;
            this.xrTable1.Borders = BorderSide.All;
            this.xrTable1.LocationFloat = new PointFloat(4.386902E-05f, 0f);
            this.xrTable1.Name = "xrTable1";
            this.xrTable1.Rows.AddRange(new XRTableRow[] { this.xrTableRow1 });
            this.xrTable1.SizeF = new SizeF(1091f, 93.375f);
            this.xrTable1.StylePriority.UseBackColor = false;
            this.xrTable1.StylePriority.UseBorders = false;
            this.xrTableRow1.Cells.AddRange(new XRTableCell[] { 
                this.colOrder, this.colEmployeeName, this.colWorkTotal, this.colRealDay, this.colNightDutyDay, this.colRegulationDay, this.colFurloughDay, this.colCompensationDay, this.colAbsentL, this.colAbsentWOL, this.colTotalHour, this.colLateMinute, this.colEarlyMinute, this.colOvertime150, this.colOvertime200, this.colOvertime300, 
                this.colNightHour, this.colExtraHour, this.colPrivateHour, this.colOvertimeTotal1, this.colPosition
             });
            this.xrTableRow1.Name = "xrTableRow1";
            this.xrTableRow1.Weight = 1.0;
            this.colOrder.CanGrow = false;
            this.colOrder.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colOrder.Name = "colOrder";
            this.colOrder.StylePriority.UseFont = false;
            this.colOrder.StylePriority.UseTextAlignment = false;
            this.colOrder.Text = "STT";
            this.colOrder.TextAlignment = TextAlignment.MiddleCenter;
            this.colOrder.Weight = 0.18749994861851288;
            this.colEmployeeName.CanGrow = false;
            this.colEmployeeName.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colEmployeeName.Name = "colEmployeeName";
            this.colEmployeeName.StylePriority.UseFont = false;
            this.colEmployeeName.StylePriority.UseTextAlignment = false;
            this.colEmployeeName.Text = "Họ v\x00e0 t\x00ean";
            this.colEmployeeName.TextAlignment = TextAlignment.MiddleCenter;
            this.colEmployeeName.Weight = 0.77235160394924551;
            this.colWorkTotal.CanGrow = false;
            this.colWorkTotal.Font = new Font("Times New Roman", 8.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.colWorkTotal.Multiline = true;
            this.colWorkTotal.Name = "colWorkTotal";
            this.colWorkTotal.Padding = new PaddingInfo(0, 0, 0, 0x10, 100f);
            this.colWorkTotal.StylePriority.UseFont = false;
            this.colWorkTotal.StylePriority.UsePadding = false;
            this.colWorkTotal.StylePriority.UseTextAlignment = false;
            this.colWorkTotal.Text = "Tổng c\x00f4ng\r\n";
            this.colWorkTotal.TextAlignment = TextAlignment.BottomCenter;
            this.colWorkTotal.Weight = 0.31877275702759755;
            this.colRealDay.CanGrow = false;
            this.colRealDay.Font = new Font("Times New Roman", 8.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.colRealDay.Multiline = true;
            this.colRealDay.Name = "colRealDay";
            this.colRealDay.Padding = new PaddingInfo(0, 0, 0, 4, 100f);
            this.colRealDay.StylePriority.UseFont = false;
            this.colRealDay.StylePriority.UsePadding = false;
            this.colRealDay.StylePriority.UseTextAlignment = false;
            this.colRealDay.Text = "NC thực tế, C\x00f4ng t\x00e1c";
            this.colRealDay.TextAlignment = TextAlignment.BottomCenter;
            this.colRealDay.Weight = 0.26564396529139778;
            this.colNightDutyDay.CanGrow = false;
            this.colNightDutyDay.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colNightDutyDay.Name = "colNightDutyDay";
            this.colNightDutyDay.StylePriority.UseFont = false;
            this.colNightDutyDay.StylePriority.UseTextAlignment = false;
            this.colNightDutyDay.Text = "Trực đ\x00eam";
            this.colNightDutyDay.TextAlignment = TextAlignment.BottomCenter;
            this.colNightDutyDay.Weight = 0.26653363876645997;
            this.colRegulationDay.CanGrow = false;
            this.colRegulationDay.Font = new Font("Times New Roman", 8.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.colRegulationDay.Name = "colRegulationDay";
            this.colRegulationDay.Padding = new PaddingInfo(0, 0, 0, 4, 100f);
            this.colRegulationDay.StylePriority.UseFont = false;
            this.colRegulationDay.StylePriority.UsePadding = false;
            this.colRegulationDay.StylePriority.UseTextAlignment = false;
            this.colRegulationDay.Text = "Nghỉ chế độ";
            this.colRegulationDay.TextAlignment = TextAlignment.BottomCenter;
            this.colRegulationDay.Weight = 0.26564397372120885;
            this.colFurloughDay.CanGrow = false;
            this.colFurloughDay.Font = new Font("Times New Roman", 8.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.colFurloughDay.Name = "colFurloughDay";
            this.colFurloughDay.StylePriority.UseFont = false;
            this.colFurloughDay.StylePriority.UseTextAlignment = false;
            this.colFurloughDay.Text = "Nghỉ ph\x00e9p năm";
            this.colFurloughDay.TextAlignment = TextAlignment.BottomCenter;
            this.colFurloughDay.Weight = 0.265643973395144;
            this.colCompensationDay.CanGrow = false;
            this.colCompensationDay.Font = new Font("Times New Roman", 8.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
            this.colCompensationDay.Multiline = true;
            this.colCompensationDay.Name = "colCompensationDay";
            this.colCompensationDay.Padding = new PaddingInfo(0, 0, 0, 4, 100f);
            this.colCompensationDay.StylePriority.UseFont = false;
            this.colCompensationDay.StylePriority.UsePadding = false;
            this.colCompensationDay.StylePriority.UseTextAlignment = false;
            this.colCompensationDay.Text = "Nghỉ b\x00f9\r\n\r\n";
            this.colCompensationDay.TextAlignment = TextAlignment.BottomCenter;
            this.colCompensationDay.Weight = 0.26564396208015639;
            this.colAbsentL.CanGrow = false;
            this.colAbsentL.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colAbsentL.Multiline = true;
            this.colAbsentL.Name = "colAbsentL";
            this.colAbsentL.StylePriority.UseFont = false;
            this.colAbsentL.StylePriority.UseTextAlignment = false;
            this.colAbsentL.Text = "Nghỉ c\x00f3 l\x00fd do\r\n";
            this.colAbsentL.TextAlignment = TextAlignment.BottomCenter;
            this.colAbsentL.Weight = 0.26564396194220047;
            this.colAbsentWOL.CanGrow = false;
            this.colAbsentWOL.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colAbsentWOL.Name = "colAbsentWOL";
            this.colAbsentWOL.StylePriority.UseFont = false;
            this.colAbsentWOL.StylePriority.UseTextAlignment = false;
            this.colAbsentWOL.Text = "Nghỉ kh\x00f4ng l\x00fd do";
            this.colAbsentWOL.TextAlignment = TextAlignment.BottomCenter;
            this.colAbsentWOL.Weight = 0.26564396194220052;
            this.colTotalHour.CanGrow = false;
            this.colTotalHour.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colTotalHour.Name = "colTotalHour";
            this.colTotalHour.StylePriority.UseFont = false;
            this.colTotalHour.StylePriority.UseTextAlignment = false;
            this.colTotalHour.Text = "Tổng giờ";
            this.colTotalHour.TextAlignment = TextAlignment.BottomCenter;
            this.colTotalHour.Weight = 0.26564397124488814;
            this.colLateMinute.CanGrow = false;
            this.colLateMinute.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colLateMinute.Multiline = true;
            this.colLateMinute.Name = "colLateMinute";
            this.colLateMinute.StylePriority.UseFont = false;
            this.colLateMinute.StylePriority.UseTextAlignment = false;
            this.colLateMinute.Text = "Đi trễ\r\n(m)";
            this.colLateMinute.TextAlignment = TextAlignment.BottomCenter;
            this.colLateMinute.Weight = 0.26564397124488814;
            this.colEarlyMinute.CanGrow = false;
            this.colEarlyMinute.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colEarlyMinute.Multiline = true;
            this.colEarlyMinute.Name = "colEarlyMinute";
            this.colEarlyMinute.StylePriority.UseFont = false;
            this.colEarlyMinute.StylePriority.UseTextAlignment = false;
            this.colEarlyMinute.Text = "Về sớm\r\n(m)";
            this.colEarlyMinute.TextAlignment = TextAlignment.BottomCenter;
            this.colEarlyMinute.Weight = 0.26564397207571377;
            this.colOvertime150.CanGrow = false;
            this.colOvertime150.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colOvertime150.Multiline = true;
            this.colOvertime150.Name = "colOvertime150";
            this.colOvertime150.Padding = new PaddingInfo(0, 0, 0, 0x10, 100f);
            this.colOvertime150.StylePriority.UseFont = false;
            this.colOvertime150.StylePriority.UsePadding = false;
            this.colOvertime150.StylePriority.UseTextAlignment = false;
            this.colOvertime150.Text = "\r\n\r\n\r\nNg\x00e0y thường\r\n(h)";
            this.colOvertime150.TextAlignment = TextAlignment.BottomCenter;
            this.colOvertime150.Weight = 0.24439244026583082;
            this.colOvertime200.CanGrow = false;
            this.colOvertime200.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colOvertime200.Multiline = true;
            this.colOvertime200.Name = "colOvertime200";
            this.colOvertime200.Padding = new PaddingInfo(0, 0, 0, 0x10, 100f);
            this.colOvertime200.StylePriority.UseFont = false;
            this.colOvertime200.StylePriority.UsePadding = false;
            this.colOvertime200.StylePriority.UseTextAlignment = false;
            this.colOvertime200.Text = "\r\n\r\n\r\nNg\x00e0y chủ nhật (h)";
            this.colOvertime200.TextAlignment = TextAlignment.BottomCenter;
            this.colOvertime200.Weight = 0.24439243771270092;
            this.colOvertime300.CanGrow = false;
            this.colOvertime300.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colOvertime300.Name = "colOvertime300";
            this.colOvertime300.Padding = new PaddingInfo(0, 0, 0, 0x10, 100f);
            this.colOvertime300.StylePriority.UseFont = false;
            this.colOvertime300.StylePriority.UsePadding = false;
            this.colOvertime300.StylePriority.UseTextAlignment = false;
            this.colOvertime300.Text = "Ng\x00e0y lễ (h)";
            this.colOvertime300.TextAlignment = TextAlignment.BottomCenter;
            this.colOvertime300.Weight = 0.24439243702127017;
            this.colNightHour.CanGrow = false;
            this.colNightHour.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colNightHour.Name = "colNightHour";
            this.colNightHour.Padding = new PaddingInfo(0, 0, 0, 4, 100f);
            this.colNightHour.StylePriority.UseFont = false;
            this.colNightHour.StylePriority.UsePadding = false;
            this.colNightHour.StylePriority.UseTextAlignment = false;
            this.colNightHour.Text = "L\x00e0m đ\x00eam (h)";
            this.colNightHour.TextAlignment = TextAlignment.BottomCenter;
            this.colNightHour.Weight = 0.24439244244608371;
            this.colExtraHour.CanGrow = false;
            this.colExtraHour.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colExtraHour.Multiline = true;
            this.colExtraHour.Name = "colExtraHour";
            this.colExtraHour.StylePriority.UseFont = false;
            this.colExtraHour.StylePriority.UseTextAlignment = false;
            this.colExtraHour.Text = "\r\n\r\n\r\nTăng Cường (h)";
            this.colExtraHour.TextAlignment = TextAlignment.MiddleCenter;
            this.colExtraHour.Weight = 0.24439244425586537;
            this.colPrivateHour.CanGrow = false;
            this.colPrivateHour.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colPrivateHour.Multiline = true;
            this.colPrivateHour.Name = "colPrivateHour";
            this.colPrivateHour.Padding = new PaddingInfo(0, 0, 0, 0x10, 100f);
            this.colPrivateHour.StylePriority.UseFont = false;
            this.colPrivateHour.StylePriority.UsePadding = false;
            this.colPrivateHour.StylePriority.UseTextAlignment = false;
            this.colPrivateHour.Text = "\r\n\r\n\r\nViệc ri\x00eang (h)";
            this.colPrivateHour.TextAlignment = TextAlignment.MiddleCenter;
            this.colPrivateHour.Weight = 0.2178281195306907;
            this.colOvertimeTotal1.CanGrow = false;
            this.colOvertimeTotal1.Font = new Font("Times New Roman", 8.25f, FontStyle.Bold);
            this.colOvertimeTotal1.Multiline = true;
            this.colOvertimeTotal1.Name = "colOvertimeTotal1";
            this.colOvertimeTotal1.StylePriority.UseFont = false;
            this.colOvertimeTotal1.StylePriority.UseTextAlignment = false;
            this.colOvertimeTotal1.Text = "\r\n\r\nTổng giờ (h)";
            this.colOvertimeTotal1.TextAlignment = TextAlignment.MiddleCenter;
            this.colOvertimeTotal1.Weight = 0.20941578643818717;
            this.colPosition.CanGrow = false;
            this.colPosition.Font = new Font("Times New Roman", 9.75f, FontStyle.Bold);
            this.colPosition.Name = "colPosition";
            this.colPosition.StylePriority.UseFont = false;
            this.colPosition.StylePriority.UseTextAlignment = false;
            this.colPosition.Text = "Ghi ch\x00fa";
            this.colPosition.TextAlignment = TextAlignment.MiddleCenter;
            this.colPosition.Weight = 0.21119136399022398;
            this.ReportFooter.HeightF = 16f;
            this.ReportFooter.Name = "ReportFooter";
            base.Bands.AddRange(new Band[] { this.Detail, this.TopMargin, this.BottomMargin, this.ReportHeader, this.GroupHeader1, this.ReportFooter });
            base.Font = new Font("Times New Roman", 9.75f);
            base.Landscape = true;
            base.Margins = new Margins(0x2d, 0x21, 0x30, 0x38);
            base.PageHeight = 0x33b;
            base.PageWidth = 0x491;
            base.PaperKind = PaperKind.A4;
            base.Version = "9.3";
            this.BeforePrint += new PrintEventHandler(this.rptListEmployee_BeforePrint);
            this.xrTable2.EndInit();
            this.xrTable1.EndInit();
            this.EndInit();
        }

        private void LoadLevel()
        {
            if (this.m_Level == 1)
            {
                HRM_BRANCH hrm_branch = new HRM_BRANCH();
                hrm_branch.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_branch.BranchName;
            }
            else if (this.m_Level == 2)
            {
                HRM_DEPARTMENT hrm_department = new HRM_DEPARTMENT();
                hrm_department.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_department.DepartmentName;
            }
            else if (this.m_Level == 3)
            {
                HRM_GROUP hrm_group = new HRM_GROUP();
                hrm_group.Get(this.m_Code);
                this.txtUnit.Text = "Đơn vị: " + hrm_group.GroupName;
            }
        }

        private void LoadListEmployee()
        {
            HRM_TIMEKEEPER_TABLELIST hrm_timekeeper_tablelist = new HRM_TIMEKEEPER_TABLELIST();
            hrm_timekeeper_tablelist.Get(this.m_Month, this.m_Year);
            DataSet set = new DataSet();
            DataTable table = new DataTable();
            table = this.l_TimekeeperTotal.GetList(this.m_Level, this.m_Code, hrm_timekeeper_tablelist.TimeKeeperTableListID);
            set.Tables.Add(table);
            base.DataSource = set;
            base.DataMember = table.TableName;
            base.DataAdapter = table;
        }

        private void rptListEmployee_BeforePrint(object sender, PrintEventArgs e)
        {
            this.txtTitle.Text = "BẢNG TỔNG HỢP CHẤM C\x00d4NG TH\x00c1NG " + this.m_Month.ToString() + "/" + this.m_Year.ToString();
            this.LoadLevel();
            this.LoadListEmployee();
            CreateHeaderReport.CreateHeader(this.ReportHeader);
            CreateFooterReport.CreateFooter("IsTimekeeper", this.ReportFooter, this);
            clsOptionPrintTimekeeperTable table = new clsOptionPrintTimekeeperTable();
            if (!table.IsShowExtraHour)
            {
                this.xrTableRow1.Cells.Remove(this.colExtraHour);
                this.xrTableRow2.Cells.Remove(this.txtExtraHour);
            }
            if (!table.IsShowPrivateHour)
            {
                this.xrTableRow1.Cells.Remove(this.colPrivateHour);
                this.xrTableRow2.Cells.Remove(this.txtPrivateHour);
            }
            this.colOrder.WidthF = 35.29f;
            this.colEmployeeName.WidthF = 145.37f;
            this.colWorkTotal.WidthF = 60f;
            this.colRealDay.WidthF = 50f;
            this.colNightDutyDay.WidthF = 50.17f;
            this.colRegulationDay.WidthF = 50f;
            this.colFurloughDay.WidthF = 50f;
            this.colCompensationDay.WidthF = 50f;
            this.colAbsentL.WidthF = 50f;
            this.colAbsentWOL.WidthF = 50f;
            this.colTotalHour.WidthF = 50f;
            this.colLateMinute.WidthF = 50f;
            this.colEarlyMinute.WidthF = 50f;
            this.txtOrder.WidthF = 35.29f;
            this.txtEmployeeName.WidthF = 145.37f;
            this.txtWorkTotal.WidthF = 60f;
            this.txtRealDay.WidthF = 50f;
            this.txtNightDutyDay.WidthF = 50.17f;
            this.txtRegulationDay.WidthF = 50f;
            this.txtFurloughDay.WidthF = 50f;
            this.txtCompensationDay.WidthF = 50f;
            this.txtAbsentL.WidthF = 50f;
            this.txtAbsentWOL.WidthF = 50f;
            this.txtTotalHour.WidthF = 50f;
            this.txtLateMinute.WidthF = 50f;
            this.txtEarlyMinute.WidthF = 50f;
            if (!(table.IsShowExtraHour || table.IsShowPrivateHour))
            {
                this.colOvertime150.WidthF = 62.284f;
                this.colOvertime200.WidthF = 62.284f;
                this.colOvertime300.WidthF = 62.284f;
                this.colNightHour.WidthF = 62.284f;
                this.colOvertimeTotal1.WidthF = 62.284f;
                this.txtOvertime150.WidthF = 62.284f;
                this.txtOvertime200.WidthF = 62.284f;
                this.txtOvertime300.WidthF = 62.284f;
                this.txtNightHour.WidthF = 62.284f;
                this.txtOvertimeTotal1.WidthF = 62.284f;
            }
            else if (!(table.IsShowPrivateHour || !table.IsShowPrivateHour))
            {
                this.colOvertime150.WidthF = 51f;
                this.colOvertime200.WidthF = 51f;
                this.colOvertime300.WidthF = 51f;
                this.colNightHour.WidthF = 51f;
                this.colPrivateHour.WidthF = 51f;
                this.colOvertimeTotal1.WidthF = 56.24f;
                this.txtOvertime150.WidthF = 51f;
                this.txtOvertime200.WidthF = 51f;
                this.txtOvertime300.WidthF = 51f;
                this.txtNightHour.WidthF = 51f;
                this.txtPrivateHour.WidthF = 51f;
                this.txtOvertimeTotal1.WidthF = 56.24f;
            }
            else if (!(!table.IsShowPrivateHour || table.IsShowPrivateHour))
            {
                this.colOvertime150.WidthF = 51f;
                this.colOvertime200.WidthF = 51f;
                this.colOvertime300.WidthF = 51f;
                this.colNightHour.WidthF = 51f;
                this.colExtraHour.WidthF = 51f;
                this.colOvertimeTotal1.WidthF = 56.24f;
                this.txtOvertime150.WidthF = 51f;
                this.txtOvertime200.WidthF = 51f;
                this.txtOvertime300.WidthF = 51f;
                this.txtNightHour.WidthF = 51f;
                this.txtExtraHour.WidthF = 51f;
                this.txtOvertimeTotal1.WidthF = 56.24f;
            }
        }

        private void txtOrder_BeforePrint(object sender, PrintEventArgs e)
        {
            this.m_Order++;
            this.txtOrder.Text = this.m_Order.ToString();
        }
    }
}

